package com.wxapp.custom.service.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wxapp.common.constant.base.IBaseController;
import com.wxapp.common.constant.pojo.vm.ResultVm;
import com.wxapp.custom.api.pojo.vm.custom.PCustomPageVm;
import com.wxapp.custom.api.pojo.vo.custom.QCustomPageVo;
import com.wxapp.custom.service.service.CustomService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lgl
 * @Description
 * @Datetime 2023/10/7 10:07
 * @Modified By
 */
@RestController
@RequestMapping("custom")
@RequiredArgsConstructor
@Tag(name = "客户管理")
public class CustomController extends IBaseController {
    private final CustomService customService;

    @PostMapping("/page")
    @Operation(summary ="获取客户分页")
    public ResultVm<Page<PCustomPageVm>> pageUser(@RequestBody QCustomPageVo vo) {
        return customService.pageCustom(vo);
    }

}
